/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package controller;

/**
 *
 * @author pedro
 */
import ejb.metodos.SessionBeanLocal;
import javax.ejb.EJB;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

public class LoadTimer implements ServletContextListener {

    @EJB(mappedName = "SessionBeanEJB")
    private SessionBeanLocal sessionBean;

    @Override
    public void contextInitialized(ServletContextEvent servletcontextevent) {
        System.out.println("Starting timer");
        sessionBean.startTimer();
    }

    @Override
    public void contextDestroyed(ServletContextEvent servletcontextevent) {
    }
}
